import request from "/@/utils/request"

export function fetchList(query) {
  return request({
    url: '/form/form/page',
    method: 'get',
    params: query
  })
}

export function fetchListAll(query) {
  return request({
    url: '/form/findAll',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: '/form/form',
    method: 'post',
    data: obj
  })
}


export function delObj(id) {
  return request({
    url: '/form/form/' + id,
    method: 'delete'
  })
}


export function putObj(obj) {
  return request({
    url: '/form/form',
    method: 'put',
    data: obj
  })
}

export function delFile(id) {
  return request({
    url: '/form/formFile/removeNames',
    method: 'delete',
    data: [id],
  })
}
